<template>
	<view>
		<button  @click="to_facebook_login">facebook</button>
	
	</view>
</template>

<script>
	window.fbAsyncInit = function() {
		FB.init({
			appId: '491744163451317',
			cookie: true,
			xfbml: true,
			version: 'v10.0'
		});
	
		FB.AppEvents.logPageView();
	
		// Additional initialization code here
	};
	
	(function(d, s, id) {
		var js, fjs = d.getElementsByTagName(s)[0];
		if (d.getElementById(id)) {
			return;
		}
		js = d.createElement(s);
		js.id = id;
		js.src = "https://connect.facebook.net/en_US/sdk.js";
		fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
	
	

	export default {
		data() {
			return {
				is_see: 0,
			
			};
		},
		onLoad(opt) {
			
		},
		methods: {
			
	
			//facebook登录
			to_facebook_login() {
				console.log('1111')
				FB.login((response) => {
					if (response.authResponse) {
						console.log('Facebook Login Successful', response);
						// 可以在这里获取用户信息和访问令牌
					} else {
						console.error('Facebook Login Failed');
					}
					console.log(response)
				}, {
					// scope: 'email' ,
				}); // 根据需要添加额外的权限
			},
		}
	}
	
</script>

<style>
</style>